<?php
namespace App\Http\Validator;

use Swoft\Validator\Annotation\Mapping\IsString;
use Swoft\Validator\Annotation\Mapping\Length;
use Swoft\Validator\Annotation\Mapping\Validator;

/**
 * 验证传递的 Token 参数
 * Class TokenValidator
 * @package App\Http\Validator
 * @Validator(name="TokenValidator")
 */
class TokenValidator
{

    /**
     * @IsString(message="Token 格式错误")
     * @Length(min=210, max=600, message="Token 格式错误")
     */
    protected $token = '';

    /**
     * @return mixed
     */
    public function getToken()
    {
        return $this->token;
    }

    /**
     * @param mixed $token
     */
    public function setToken($token): void
    {
        $this->token = $token;
    }
}
